
**********************************************************************
** TITLE: Support for Progressive Taxation							**
** AUTHORS:	Stiers, Hooghe, Goubin, & Lewis-Beck 					**
** PURPOSE:	Replication of main results and supplementary materials	**
**********************************************************************


*** Results presented in the main text ***

*Load data
use "Data_for_replication.dta" , clear

*Winsorise outliers on 3 standard deviations from mean
replace Tax_difference=-46.95133 if Tax_difference<-46.91533
replace Tax_difference=92.93423 if Tax_difference>92.93423

***Table 1
preserve
*Create single estimation sample
regress Tax_difference i.Sex Age i.Not_active sophistication Income Ideology
keep if e(sample)
*Model 1
regress Tax_difference i.Sex Age i.Not_active sophistication Ideology Income
*Model 2
regress Tax_difference i.Sex Age i.Not_active Income c.Ideology##c.sophistication
*Model 3
regress Tax_difference i.Sex Age i.Not_active c.sophistication##c.Income Ideology
restore


***Figure 1
	*Model to calculate effects left-hand side figure (Table 1 Model 2)
	regress Tax_difference i.Sex Age i.Not_active Income c.Ideology##c.sophistication
	*Calculate marginal effects
	margins, dydx(Ideology) at(sophistication=(0 1 2 3 4 5 6))
	*Create left side plot
	marginsplot, scheme(lean1) ytitle("Average marginal effect of Ideology") title("") yline(0) ylabel(-6(2)2) ///
	recast(line) ciopts(recast(rline) lpattern(dash)) name(f1,replace) xtitle("Political sophistication")	///
	addplot(hist sophistication, percent yaxis(2) yscale(axis(2) alt) yscale(range(0(10)100) axis(2)) ytitle("Percentage of observations", axis(2) placement(6)) ///
	ylabel(0(10)20,axis(2)) xlabel(0(1)6)) legend(off)
	*Model to calculate effects right-hand side figure (Table 1 Model 3)
	regress Tax_difference i.Sex Age i.Not_active c.sophistication##c.Income Ideology
	*Calculate marginal effects
	margins, dydx(Income) at(sophistication=(0 1 2 3 4 5 6))
	*Create left side plot
	marginsplot, scheme(lean1) ytitle("Average marginal effect of income") title("") yline(0) ylabel(-6(2)2) ///
	recast(line) ciopts(recast(rline) lpattern(dash)) name(f2,replace) xtitle("Political sophistication")	///
	addplot(hist sophistication, percent yaxis(2) yscale(axis(2) alt) yscale(range(0(10)100) axis(2)) ytitle("Percentage of observations", axis(2) placement(6)) ///
	ylabel(0(10)20,axis(2)) xlabel(0(1)6)) legend(off)
*Combine figures for final Figure 1
graph combine f1 f2 , scheme(lean1) ycommon xsize(9)


***Table 2
preserve
*Create single estimation sample
logit Flat_tax i.Sex Age i.Not_active c.sophistication c.Income Ideology
keep if e(sample)
*Model 1
logit Flat_tax  i.Sex Age i.Not_active sophistication Ideology Income 
*Model 2
logit Flat_tax  i.Sex Age i.Not_active Income c.Ideology##c.sophistication
*Model 3
logit Flat_tax  i.Sex Age i.Not_active c.sophistication##c.Income Ideology
restore


***Figure 2
	*Model to calculate effects left-hand side figure (Table 2 Model 2)
	logit Flat_tax  i.Sex Age i.Not_active Income c.Ideology##c.sophistication
	*Calculate marginal effects
	margins, dydx(Ideology) at(sophistication=(0 1 2 3 4 5 6))
	*Create left side plot
	marginsplot, scheme(lean1) ytitle("Average marginal effect of Ideology") title("") yline(0) ///
	recast(line) ciopts(recast(rline) lpattern(dash)) name(f1,replace) xtitle("Political sophistication")	///
	addplot(hist sophistication, percent yaxis(2) yscale(axis(2) alt) yscale(range(0(10)100) axis(2)) ytitle("Percentage of observations", axis(2) placement(6)) ///
	ylabel(0(10)20,axis(2)) xlabel(0(1)6) ylabel(-0.05(0.05)0.1)) legend(off)
	*Model to calculate effects right-hand side figure (Table 2 Model 3)
	logit Flat_tax  i.Sex Age i.Not_active c.sophistication##c.Income Ideology
	*Calculate marginal effects
	margins, dydx(Income) at(sophistication=(0 1 2 3 4 5 6))
	*Create left side plot
	marginsplot, scheme(lean1) ytitle("Average marginal effect of income") title("") yline(0) ylabel(-0.05(0.05)0.1) ///
	recast(line) ciopts(recast(rline) lpattern(dash)) name(f2,replace) xtitle("Political sophistication")	///
	addplot(hist sophistication, percent yaxis(2) yscale(axis(2) alt) yscale(range(0(10)100) axis(2)) ytitle("Percentage of observations", axis(2) placement(6)) ///
	ylabel(0(10)20,axis(2)) xlabel(0(1)6)) legend(off)	
*Combine figures for final Figure 2
graph combine f1 f2 , scheme(lean1) ycommon xsize(9)


*** Analyses presented in the online supplementary material ***

***Appendix A
*Table A.1
sum Tax_difference Sex Age Not_active Income Ideology sophistication

***Appendix B
*Table B.1
preserve
drop if Tax_ratio>100
replace Tax_ratio=100 if Tax_rich==0&Tax_poor==0
*Create single estimation sample
regress Tax_ratio i.Sex Age i.Not_active c.sophistication c.Income Ideology
keep if e(sample)
*Model 1
regress Tax_ratio i.Sex Age i.Not_active sophistication Income Ideology
*Model 2
regress Tax_ratio i.Sex Age i.Not_active Income c.Ideology##c.sophistication
*Model 3
regress Tax_ratio i.Sex Age i.Not_active c.sophistication##c.Income Ideology
restore


***Figure B.1
preserve
drop if Tax_ratio>100
replace Tax_ratio=100 if Tax_rich==0&Tax_poor==0
	*Model to calculate effects left-hand side figure
	regress Tax_ratio i.Sex Age i.Not_active Income c.Ideology##c.sophistication
	*Calculate marginal effects
	margins, dydx(Ideology) at(sophistication=(0 1 2 3 4 5 6))
	*Create left side plot
	marginsplot, scheme(lean1) ytitle("Average marginal effect of Ideology") title("") yline(0) ///
	recast(line) ciopts(recast(rline) lpattern(dash)) name(f1,replace) xtitle("Political sophistication")	///
	addplot(hist sophistication, percent yaxis(2) yscale(axis(2) alt) yscale(range(0(10)100) axis(2)) ytitle("Percentage of observations", axis(2) placement(6)) ///
	ylabel(0(10)20,axis(2))  ylabel(-5(5)10) xlabel(0(1)6)) legend(off)
	*Model to calculate effects right-hand side figure
	regress Tax_ratio i.Sex Age i.Not_active c.sophistication##c.Income Ideology
	*Calculate marginal effects
	margins, dydx(Income) at(sophistication=(0 1 2 3 4 5 6))
	*Create left side plot
	marginsplot, scheme(lean1) ytitle("Average marginal effect of income") title("") yline(0) ylabel(-5(5)10) ///
	recast(line) ciopts(recast(rline) lpattern(dash)) name(f2,replace) xtitle("Political sophistication")	///
	addplot(hist sophistication, percent yaxis(2) yscale(axis(2) alt) yscale(range(0(10)100) axis(2)) ytitle("Percentage of observations", axis(2) placement(6)) ///
	ylabel(0(10)20,axis(2)) xlabel(0(1)6)) legend(off)
restore
*Combine figures for final Figure B.1
graph combine f1 f2 , scheme(lean1) ycommon xsize(9)


***Appendix C
*Figure C.1
hist Tax_rich , percent scheme(lean1) xlabel(0(10)100) xtitle("Tax rate") ytitle("Proportion of observations") title("Rich person") name(f1,replace)
hist Tax_poor , percent scheme(lean1) xlabel(0(10)100) xtitle("Tax rate") ytitle("Proportion of observations") title("Poor person") name(f2,replace)
graph combine f1 f2 , scheme(lean1) ycommon xcommon xsize(9)

*Figure C.2
hist Tax_difference , percent width(5) scheme(lean1) xlabel(-100(20)100) xtitle("Differrence tax rate rich vs. poor person") ytitle("Proportion of observations") title("")

*Figure C.3
hist Tax_difference if intervention<2 , percent width(5) scheme(lean1) name(f1,replace) xlabel(-100(50)100) ///
xtitle("Differrence tax rate rich vs. poor person") ytitle("Proportion of observations") title("Disagree with government intervention")
hist Tax_difference if intervention>2 , percent width(5) scheme(lean1) name(f2,replace) xlabel(-100(50)100) ///
xtitle("Differrence tax rate rich vs. poor person") ytitle("Proportion of observations") title("Agree with government intervention")
graph combine f1 f2 , ycommon xcommon scheme(lean1)

*Figure C.4
hist Tax_difference if intervention==2 , percent width(5) scheme(lean1) xlabel(-100(50)100) ///
xtitle("Differrence tax rate rich vs. poor person") ytitle("Proportion of observations") title("Agree nor disagree with government intervention")


***Appendix D
use "Data_replication_multilevel" , clear

*Winsorise outliers on 3 standard deviations from mean
replace Tax_difference=-46.95133 if Tax_difference<-46.91533
replace Tax_difference=92.93423 if Tax_difference>92.93423

*Table D.1
preserve
*Create single estimation sample
regress Tax_difference i.Sex Age c.sophistication i.Not_active c.Income Ideology mean_IQC
keep if e(sample)
*Model 1
mixed Tax_difference i.Sex Age i.Not_active sophistication Income Ideology mean_IQC || Postal_code:
*Model 2
mixed Tax_difference i.Sex Age i.Not_active c.sophistication##c.Income Ideology mean_IQC || Postal_code:
*Model 3
mixed Tax_difference i.Sex Age i.Not_active Income c.Ideology##c.sophistication mean_IQC || Postal_code:
restore


***Figure D.1
	*Model to calculate effects left-hand side figure
	mixed Tax_difference i.Sex Age i.Not_active Income c.Ideology##c.sophistication mean_IQC || Postal_code:
	*Calculate marginal effects
	margins, dydx(Ideology) at(sophistication=(0 1 2 3 4 5 6))
	*Create left side plot
	marginsplot, scheme(lean1) ytitle("Average marginal effect of Ideology") title("") yline(0) ylabel(-6(2)2) ///
	recast(line) ciopts(recast(rline) lpattern(dash)) name(f1,replace) xtitle("Political sophistication") ///
	addplot(hist sophistication, percent yaxis(2) yscale(axis(2) alt) yscale(range(0(10)100) axis(2)) ytitle("Percentage of observations", axis(2) placement(6)) ///
	ylabel(0(10)20,axis(2)) xlabel(0(1)6)) legend(off)
	*Model to calculate effects right-hand side figure
	mixed Tax_difference i.Sex Age i.Not_active c.sophistication##c.Income Ideology mean_IQC || Postal_code:
	*Calculate marginal effects
	margins, dydx(Income) at(sophistication=(0 1 2 3 4 5 6))
	*Create left side plot
	marginsplot, scheme(lean1) ytitle("Average marginal effect of income") title("") yline(0) ylabel(-6(2)2) ///
	recast(line) ciopts(recast(rline) lpattern(dash)) name(f2,replace) xtitle("Political sophistication") ///
	addplot(hist sophistication, percent yaxis(2) yscale(axis(2) alt) yscale(range(0(10)100) axis(2)) ytitle("Percentage of observations", axis(2) placement(6)) ///
	ylabel(0(10)20,axis(2)) xlabel(0(1)6)) legend(off)
*Combine figures for final Figure D.1
graph combine f1 f2 , scheme(lean1) ycommon xsize(9)


***Appendix E
use "Data_for_replication.dta" , clear

*Winsorise outliers on 3 standard deviations from mean
replace Tax_difference=-46.95133 if Tax_difference<-46.91533
replace Tax_difference=92.93423 if Tax_difference>92.93423

*Table E.1
preserve
*Create single estimation sample
regress Tax_difference i.Sex Age c.sophistication c.Income Immigration i.Not_active
keep if e(sample)
*Model 1
regress Tax_difference i.Sex Age i.Not_active sophistication Income Immigration
*Model 2
regress Tax_difference i.Sex Age i.Not_active Income c.Immigration##c.sophistication
*Model 3
regress Tax_difference i.Sex Age i.Not_active c.sophistication##c.Income Immigration
restore


***Figure E.1
	*Model to calculate effects left-hand side figure
	regress Tax_difference i.Sex Age i.Not_active Income c.Immigration##c.sophistication
	*Calculate marginal effects
	margins, dydx(Immigration) at(sophistication=(0 1 2 3 4 5 6)) post
	*Create left side plot
	marginsplot, scheme(lean1) ytitle("Average marginal effect" "anti-immigrant sentiments") title("") yline(0) ///
	recast(line) ciopts(recast(rline) lpattern(dash)) name(f1,replace) xtitle("Political sophistication")	///
	addplot(hist sophistication, percent yaxis(2) yscale(axis(2) alt) yscale(range(0(10)100) axis(2)) ytitle("Percentage of observations", axis(2) placement(6)) ///
	ylabel(0(10)20,axis(2))  ylabel(-10(5)10) xlabel(0(1)6)) legend(off)
	*Model to calculate effects right-hand side figure
	regress Tax_difference i.Sex Age i.Not_active c.sophistication##c.Income Immigration
	*Calculate marginal effects
	margins, dydx(Income) at(sophistication=(0 1 2 3 4 5 6)) post
	*Create left side plot
	marginsplot, scheme(lean1) ytitle("Average marginal effect of income") title("") yline(0) ///
	recast(line) ciopts(recast(rline) lpattern(dash)) name(f2,replace) xtitle("Political sophistication")	///
	addplot(hist sophistication, percent yaxis(2) yscale(axis(2) alt) yscale(range(0(10)100) axis(2)) ytitle("Percentage of observations", axis(2) placement(6)) ///
	ylabel(0(10)20,axis(2))  ylabel(-10(5)10) xlabel(0(1)6)) legend(off)	
*Combine figures for final Figure E.1
graph combine f1 f2 , scheme(lean1) ycommon xsize(9)


***Appendix F
*Table F.1
ttest Age, by(group)

*Table F.2
tab Sex group, column chi

*Table F.3
tab Education group, column chi

*Table F.4
tab Job_position group, column chi

*Table F.5
tab Job_sector group, column chi


***Appendix G
*Figure G.1
graph box Tax_difference , over(ideology_cat) horizontal scheme(s1mono) ytitle("Differrence tax rate rich vs. poor person")

